import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:geomancy/styles/index.dart';
import 'package:geomancy/tools/constant.dart';
import 'package:geomancy/widgets/common_header.dart';
import 'package:geomancy/widgets/common_shadow_text.dart';
import 'package:geomancy/widgets/common_text.dart';
import 'package:geomancy/widgets/common_title.dart';

class GoodDayCalendarPage extends StatefulWidget {
  const GoodDayCalendarPage({super.key});

  @override
  State<GoodDayCalendarPage> createState() => _GoodDayCalendarPageState();
}

class _GoodDayCalendarPageState extends State<GoodDayCalendarPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CommonHeader.appBar(context: context),
      backgroundColor: ColorStyle.pageDefaultColor,
      body: ListView(
        physics: const ClampingScrollPhysics(),
        padding: EdgeInsets.fromLTRB(Constant.PAGEPADDING.w, 20.w, Constant.PAGEPADDING.w, 350.w),
        children: [
          const CommonTitleWidget(txt: '万年历'),
          Container(
            margin: EdgeInsets.only(top: 20.w),
            decoration: BoxDecoration(
                color: ColorStyle.themeLightColor,
                border: Border.all(width: 5.w, color: ColorStyle.borderColor),
                borderRadius: BorderRadius.all(Radius.circular(60.w))
            ),
            padding: EdgeInsets.fromLTRB(40.w, 20.w, 40.w, 20.w),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                const Center(child: CommonShadowTextWidget(txt: '九月十四')),
                Container(
                  height: 60.w,
                  margin: EdgeInsets.only(top: 30.w),
                  alignment: Alignment.centerLeft,
                  decoration: BoxDecoration(
                      border: Border(bottom: BorderSide(width: 1.w, color: ColorStyle.borderColor))
                  ),
                  child: const CommonText(txt: '农历  二零二四年七月(大)十一(阴历)'),
                ),
                Container(
                  height: 60.w,
                  alignment: Alignment.centerLeft,
                  decoration: BoxDecoration(
                      border: Border(bottom: BorderSide(width: 1.w, color: ColorStyle.borderColor))
                  ),
                  child: const CommonText(txt: '甲辰年  壬申月  庚戌日  [属龙]'),
                ),
                ///宜、忌
                Container(
                  padding: EdgeInsets.symmetric(vertical: 26.w),
                  decoration: BoxDecoration(
                      border: Border(bottom: BorderSide(width: 1.w, color: ColorStyle.borderColor))
                  ),
                  child: Column(
                    children: [
                      Row(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Container(
                            margin: EdgeInsets.only(right: 32.w),
                            child: Image.asset('assets/icons/icon_yi.png', height: 40.w),
                          ),
                          const Expanded(child: CommonText(txt: '祭祀 栽种 搬家 开户 开业 开业 开业开 祭祀 栽种 搬家 开户 开业 开业 开业开 祭祀 栽种 搬家 开户 开业 开业 开业开 '))
                        ],
                      ),
                      SizedBox(height: 12.w),
                      Row(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Container(
                            margin: EdgeInsets.only(right: 32.w),
                            child: Image.asset('assets/icons/icon_ji.png', height: 40.w),
                          ),
                          const Expanded(child: CommonText(txt: '祭祀 栽种 搬家 开户 开业 开业 '))
                        ],
                      )
                    ],
                  ),
                ),
                ///吉神宜趋、凶神宜忌
                Container(
                  padding: EdgeInsets.symmetric(vertical: 26.w),
                  decoration: BoxDecoration(
                      border: Border(bottom: BorderSide(width: 1.w, color: ColorStyle.borderColor))
                  ),
                  child: Column(
                    children: [
                      Row(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Container(
                            width: 130.w,
                            margin: EdgeInsets.only(right: 25.w),
                            child: const CommonText(txt: '吉神宜趋', weight: FontWeight.bold),
                          ),
                          const Expanded(child: CommonText(txt: '官日 宝光 天德合 月德合 月德合 除神 鸡犬'))
                        ],
                      ),
                      SizedBox(height: 12.w),
                      Row(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          Container(
                            width: 130.w,
                            margin: EdgeInsets.only(right: 25.w),
                            child: const CommonText(txt: '凶神宜忌', weight: FontWeight.bold),
                          ),
                          const Expanded(child: CommonText(txt: '月害 天使 血支 五离'))
                        ],
                      )
                    ],
                  ),
                ),
                Container(
                  padding: EdgeInsets.symmetric(vertical: 26.w),
                  child: Row(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Container(
                          width: 130.w,
                          margin: EdgeInsets.only(right: 25.w),
                          padding: EdgeInsets.only(right: 7.w),
                          child: const Row(
                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
                            children: [
                              CommonText(txt: '冲', weight: FontWeight.bold),
                              CommonText(txt: '合', weight: FontWeight.bold),
                            ],
                          )
                      ),
                      const Expanded(child: CommonText(txt: '今日与虎、马半合，与兔六与兔较为吉祥；与龙相冲，与鸡与牛、羊相刑。'))
                    ],
                  ),
                ),
              ],
            ),
          )
        ],
      ),
    );
  }
}
